package cn.com.b2office.service;

import java.util.List;
import java.util.Map;

import cn.com.b2office.bean.AccountStat;
import cn.com.b2office.domain.Member;
import cn.com.b2office.domain.MemberAddress;

public interface MemberService {

	List<MemberAddress> findAllAddress(String memberId);

	/**
	 * 获取所有的文字描述
	 * 
	 * @param addressList
	 * @return
	 */
	Map<String, String> translateAddress(List<MemberAddress> addressList);

	String translateAddress(MemberAddress address);

	MemberAddress getRegAddress(String memberId);

	MemberAddress getMemberAddress(String addressId);

	/** return false 注册名不存在,可以注册 ; return true 注册名存在，不能注册 */
	boolean ifRegNameExist(String regName);

	/** return false 注册Email不存在,可以注册 ; return true 注册名存在，不能注册 */
	boolean ifRegEmailExist(String regEmail);

	void createMember(Member member);

	/** 根据email 得到用户信息 */
	Member getMemberByEmail(String regEmail);

	Member getMemberByMemberno(String memberno);

	Member getMemberByNameAndEmail(String regName, String email);

	Member getMemberByMembernoAndEmail(String memberno, String email);

	void initializeMemberPwd(String memberId, String pwd);

	Member getMember(String memberId);

	void updateMember(Member member);

	void updateMemberAddress(MemberAddress address);

	void createAddress(MemberAddress address);

	AccountStat getAccountStat(String memberId);
}
